home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / ENCRYPT.SWG / 0007_ENCRYPT4.PAS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  1KB  |  53 lines

  1. { JC> I was wondering what Format you Programmers out there use to make
  2.  JC> registration codes.  I was fooling around With a letter standing For
  3.  JC> another letter but thats too simple.  How can I go about writing
  4.  JC> bullet proof (or at least bullet resistant)  registration codes.  BTW,
  5.  JC> this is not an over the modem Type Program.  if you understand what
  6.  JC> I'm TRYinG to say, I wopuld RealLY appreciate a response.  Thanks a
  7.  JC> lot!!!
  8. }
  9.  
  10.  
  11. Program RegCode;
  12.  
  13. Uses Crt;
  14.  
  15. Var
  16.   ch : Char;
  17.   Name : String;
  18.  
  19. Function MakeRegCode(S:String): LongInt;
  20.  
  21. Var
  22.  I: LongInt;
  23.  B: Byte;
  24.  
  25. begin
  26.  I:=0;   { Could make this something else if you want it more random looking }
  27.  For B:=1 to Length(S)
  28.   Do I:=I+ord(S[B]); { Could make it ord(S[B]+SomeValue) to make it more
  29.                 interesting }
  30.  MakeRegCode:=I;
  31. end;
  32.  
  33. begin
  34.  
  35.  Writeln;
  36.  Writeln;
  37.  Write('Enter SysOp Name : ');
  38.  Readln(Name);
  39.  Writeln;
  40.  Writeln('The resultant code was ',MakeRegCode(Name));
  41.  Writeln;
  42.  ch:=ReadKey;
  43.  
  44. end.
  45.  
  46.  
  47. {You can also add a BBS Name or a City or anything else you want. just keep on
  48. adding it to the I Var in the MakeRegCode proc.  to check to see if a reg code
  49. is valid, just Compare the registration code he already has (in a cfg File
  50. comewhere I assume) With the one generated this part of code.  if they match,
  51. then is is a good code... if not... then he didn't register.
  52. }
  53.